1. Field of the Invention
The present invention relates to hibernation of an information processing apparatus.
2. Description of the Related Art
A method for shortening the activation time of an information processing apparatus is hibernation. The hibernation is a function of saving, in a nonvolatile memory such as a hard disk, the storage state of a main memory immediately before turning off the computer, and upon turning on the computer, returning the saved storage contents to the main memory so that work can be resumed from a state immediately before turning off the computer.
The hibernation will be explained in detail. A memory image during the operation of the computer and the set values of various hardware registers are saved as a data file in a secondary storage. This data file is called a snapshot image or hibernation image. When the computer is reactivated, the snapshot image is loaded into the main memory to restore the set values of the hardware registers. By the hibernation, construction of a page table in reactivation of the system, and a boot-up process for various services (resident programs) are skipped.
As a technique for speeding up activation using hibernation, there are techniques disclosed in Japanese Patent Laid-Open Nos. 2011-145933 (literature 1) and 2004-362426 (literature 2).
In the technique disclosed in literature 1, a priority flag is set for a memory area. After the memory area for which the priority flag is set is preferentially restored, the system is reactivated. A memory area for which no priority flag is set is restored gradually after reactivation.
In the technique disclosed in literature 2, volatile and nonvolatile memories are arranged as the main memory. A page having low priority in the nonvolatile memory is saved in a secondary storage, and a page having high priority in the volatile memory is saved in the nonvolatile memory. In reactivation, a restoration process is performed using the information saved in the nonvolatile memory.
To further speed up the activation process using hibernation, it is important to reduce the data size of a snapshot image. As a method of reducing the data size of a snapshot image, it is conceivable to clear a cache area allocated in the main memory before creating a snapshot image, and swap out a swapping target area allocated to the main memory.
However, if all caches have been cleared after reactivation or a memory area being used by a process has been swapped out, the throughput (processing ability per unit time) may greatly decrease for a while.